var express = require('express')
//引入文件模块fs
var fs = require("fs")
//引入路径处理模块
const path = require("path")
const filePath = path.join(__dirname, "./user.json");
var all = fs.readFileSync(filePath, "utf-8")
all = all.toString()
all = JSON.parse(all)
console.log(all);
var router = express.Router()
//获取
router.get("/getlist", function (req, res, next) {
    res.send({
        code: 400,
        msg: "获取全部数据成功",
        data: all
    })
})
module.exports = router